package com.simple.framework.core.controller;


import com.simple.framework.core.domain.R;

/**
 * @Description web层通用数据处理
 * @Author xiaoke
 * @Date 2024/8/10 18:00
 * @Version 1.0
 */
public class BaseController {

    public R<Void> success(){
        return R.success();
    }

    public<T> R<T> success(T data){
        return R.success(data);
    }

    public<T> R<T> success(int code, T data){
        return R.success(code, data);
    }

    public R<Void> fail(){
        return R.fail();
    }

    public<T> R<T> fail(int code, String msg){
        return R.fail(code, msg);
    }

}
